const mongoose=require("mongoose");
//定义数据结构
const goodsSchema=new mongoose.Schema(
    {
    number:{
        type:String,
    },//商品编号
    name:{
        type:String,
    },
    price:{
        type:Number,
    },
    store:{
        type:Number,
    },//库存
    intro:{
        type:String,
    },//商品介绍
    listImages: {
        type:String,
    },
    detailImages: {
        type:Array,
    },
	classifyId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "goodsTypeModel"
    },  
},
{ versionKey: false } //去除__v标识
)
//定义数据模型
mongoose.model("goodsModel",goodsSchema,"goods")